package com.css.fxfzfxqh.modules.buildingKilometerGrid.controller;

import com.css.fxfzfxqh.base.response.RestResponse;
import com.css.fxfzfxqh.modules.buildingKilometerGrid.service.FxqhBuildingGridService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 建筑物公里网格接口
 */
@RequestMapping("buildingGrid")
@Slf4j
@RestController
public class FxqhBuildingGridController {

    @Autowired
    FxqhBuildingGridService fxqhBuildingGridService;

    @GetMapping("findAll")
    public RestResponse<?> findBuildGridFindAllVo() {
        try {
            return RestResponse.succeed(fxqhBuildingGridService.findBuildGridFindAllVo());
        } catch (Exception v1) {
            log.error(v1.getMessage(), v1);
            return RestResponse.fail("查询失败");
        }
    }
}
